package com.czn.shopdemo.model.enums;

import lombok.Getter;

/**
 * @author Zenan Chen
 * @date 2023/4/3 10:57
 */
@Getter
public enum ResultCodeEnum {

    SUCCESS(200, "成功"),
    FAIL(201, "失败"),
    PARAM_ERROR(202, "参数不正确"),
    SERVICE_ERROR(203, "服务异常"),
    DATA_ERROR(204, "数据异常"),

    LOGIN_AUTH(208, "未登陆"),
    PERMISSION(209, "没有权限"),

    USER_ACCOUNT_ERROR(210, "用户账号不存在"),
    USER_PASSWORD_ERROR(212, "密码错误"),

    USER_ID_ERROR(213, "用户不存在"),
    PAY_RUN(220, "支付中"),
    CANCEL_ORDER_FAIL(225, "取消订单失败"),
    CANCEL_ORDER_NO(225, "不能取消预约"),

    CODE_EXIST(230, "编号已经存在"),
    CODE_ERROR(260, "编号不存在"),
    NUMBER_NO(240, "商品数量不足"),
    ;

    private Integer code;
    private String message;

    private ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
